YEAR(numeric expression or numeric variable)

Numeric Expression

Returns an integer. If the argument is a full date or a partial date, then the function returns the numeric value of the year component. If the argument is a special response, such as Don’t Know, then the function will return a range of values.

Examples:

DateVar = “01/26/2005” Year(DateVar) returns 2005

DateVar = “02/??/2005” Year(DateVar) returns 2005

DateVar=.DK, where normal range is 1/1/2000 to 12/31/2020, Year(DateVar) returns -1, [Undefined], min=2000, max=2020

TODAY = "08/10/2018" Year(TODAY) returns 2018

Tip: If the argument passed to Day(), Month(), and Year() is a numeric value and not a date variable, the function will treat the argument as a date and return the appropriate value. For example, if DateVar =43131 (which corresponds to 01/31/2018), then Year(DateVar) returns 2018.